Previous Book Contents Book Index Next

Inside Macintosh: /
QuickDraw 3D RAVE / QuickDraw 3D RAVE Reference
QuickDraw 3D RAVE Routines / Public Draw Context Methods


TQARenderEnd

A drawing engine must define a method to signal the end of any rendering into a draw context.

typedef TQAError (*TQARenderEnd) (
                                  const TQADrawContext *drawContext, 
                                  const TQARect *modifiedRect);
drawContext
A draw context.
modifiedRect
The minimum area of the back buffer of the specified draw context to display, or the value NULL.
DESCRIPTION
Your TQARenderEnd function should perform any operations necessary to display an image rendered into the draw context specified by the drawContext parameter. If the draw context is double buffered, your function should display the back buffer. If the draw context is single buffered, your function should call QAFlush. In either case, your drawing engine should unlock any frame buffers or other memory that is locked, remove any cursor shields, and so forth.

The modifiedRect parameter indicates the minimum area of the back buffer of the specified draw context that should be displayed. If the value of the modifiedRect parameter is NULL, the entire back buffer is displayed. If the value of the modifiedRect parameter is not NULL, it indicates the rectangle in the back buffer to display. Some drawing engines may exhibit improved performance when an area that is smaller than the entire draw context rectangle is passed (to avoid unnecessary pixel copying). However, the interpretation of the modifiedRect parameter is dependent on the drawing engine, which may choose to draw the entire back buffer.

Your TQARenderEnd function should return a result code (of type TQAError) indicating whether any errors have occurred since the previous call to your TQARenderStart function. If all rendering commands completed successfully, you should return the value kQANoErr. If you return any other value, the code that called QARenderEnd should assume that the rendered image is incorrect.

SPECIAL CONSIDERATIONS
Applications should call QARenderStart before performing any rendering operations in the specified draw context, and they should call either QARenderEnd to signal the end of rendering operations or QARenderAbort to cancel rendering operations. Once an application has called QARenderEnd, it should not submit any drawing requests until it has called QARenderStart again.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
28 AUG 1996